package cc.loac.heba.pojo;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.Date;

/**
 * 验证码实体类
 */
public class CheckCode {
    private Integer codeId;
    private String email;
    private String code;
    @JSONField(format ="yyyy-MM-dd kk:mm:ss")
    private Date expirationTime;
    private Integer type;

    public final static int TYPE_FORGET_PASSWORD = 0;
    public final static int TYPE_REGISTER = 1;

    public Integer getCodeId() {
        return codeId;
    }

    public void setCodeId(Integer codeId) {
        this.codeId = codeId;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Date getExpirationTime() {
        return expirationTime;
    }

    public void setExpirationTime(Date expirationTime) {
        this.expirationTime = expirationTime;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "CheckCode{" +
                "codeId=" + codeId +
                ", email='" + email + '\'' +
                ", code='" + code + '\'' +
                ", expirationTime=" + expirationTime +
                ", type=" + type +
                '}';
    }
}
